(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, 1).


The TRS R consists of the following rules:

filter(cons(X), 0, M) → cons(0)
filter(cons(X), s(N), M) → cons(X)
sieve(cons(0)) → cons(0)
sieve(cons(s(N))) → cons(s(N))
nats(N) → cons(N)
zprimessieve(nats(s(s(0))))

Rewrite Strategy: INNERMOST

(1) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)

A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 2.

The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2, 3, 4]
transitions:
cons0(0) → 0
00() → 0
s0(0) → 0
filter0(0, 0, 0) → 1
sieve0(0) → 2
nats0(0) → 3
zprimes0() → 4
01() → 5
cons1(5) → 1
cons1(0) → 1
cons1(5) → 2
s1(0) → 6
cons1(6) → 2
cons1(0) → 3
01() → 10
s1(10) → 9
s1(9) → 8
nats1(8) → 7
sieve1(7) → 4
cons2(8) → 7
s2(9) → 11
cons2(11) → 4

(2) BOUNDS(1, n^1)

(3) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

filter(cons(z0), 0, z1) → cons(0)
filter(cons(z0), s(z1), z2) → cons(z0)
sieve(cons(0)) → cons(0)
sieve(cons(s(z0))) → cons(s(z0))
nats(z0) → cons(z0)
zprimessieve(nats(s(s(0))))
Tuples:

FILTER(cons(z0), 0, z1) → c
FILTER(cons(z0), s(z1), z2) → c1
SIEVE(cons(0)) → c2
SIEVE(cons(s(z0))) → c3
NATS(z0) → c4
ZPRIMESc5(SIEVE(nats(s(s(0)))), NATS(s(s(0))))
S tuples:

FILTER(cons(z0), 0, z1) → c
FILTER(cons(z0), s(z1), z2) → c1
SIEVE(cons(0)) → c2
SIEVE(cons(s(z0))) → c3
NATS(z0) → c4
ZPRIMESc5(SIEVE(nats(s(s(0)))), NATS(s(s(0))))
K tuples:none
Defined Rule Symbols:

filter, sieve, nats, zprimes

Defined Pair Symbols:

FILTER, SIEVE, NATS, ZPRIMES

Compound Symbols:

c, c1, c2, c3, c4, c5

(5) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 6 trailing nodes:

FILTER(cons(z0), 0, z1) → c
SIEVE(cons(s(z0))) → c3
ZPRIMESc5(SIEVE(nats(s(s(0)))), NATS(s(s(0))))
NATS(z0) → c4
FILTER(cons(z0), s(z1), z2) → c1
SIEVE(cons(0)) → c2

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

filter(cons(z0), 0, z1) → cons(0)
filter(cons(z0), s(z1), z2) → cons(z0)
sieve(cons(0)) → cons(0)
sieve(cons(s(z0))) → cons(s(z0))
nats(z0) → cons(z0)
zprimessieve(nats(s(s(0))))
Tuples:none
S tuples:none
K tuples:none
Defined Rule Symbols:

filter, sieve, nats, zprimes

Defined Pair Symbols:none

Compound Symbols:none

(7) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(8) BOUNDS(1, 1)